
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>登记信息</title>
    <script type="text/javascript" src="<{$config.weburl}>/templates/wap/js/jquery-min.js"></script>
    <script type="text/javascript" src="<{$config.weburl}>/templates/wap/js/public_js_function.js"></script>
    <link type="text/css" href="<{$config.weburl}>/templates/wap/new_css/indexamazeui.css" rel="stylesheet" />
    <link type="text/css" href="<{$config.weburl}>/templates/wap/new_css/m_base.css" rel="stylesheet" />
    <link type="text/css" href="<{$config.weburl}>/templates/wap/new_css/order.css" rel="stylesheet" />
</head>
<body>
<style>
    .header_top {
        height: 50px;
        padding: 10px;
        position: relative;
        border-bottom: 1px solid #f37b1d;
        box-shadow: 0 -1px 1px #eee;
        background: #F85709;
    }
    .st_back {
        position: absolute;
        left: 10px;
        width: 30px;
        height: 30px;
    }
    .st_back a {
        float: left;
        width: 30px;
        height: 24px;
        margin-top: 3px;
        background: url(<{$config.weburl}>/templates/wap/images/st_user_ico.png) no-repeat 0 0;
        background-size: 355px auto;

    }
    .header_top .tit {
        padding: 0;
        margin: 0;
        color: #fff;
        height: 30px;
        line-height: 30px;
        text-align: center;
        font-size: 1.6rem;
        font-weight: 500;
    }
</style>
<div class="home_top clearfix header_top">
    <div class="st_back"><a href="javascript:;" onclick="javascript:history.go(-1);"></a></div>
    <h1 class="tit">缺货登记</h1>
    <div class="user_login">
        <a href="<{$config.weburl}>/login.php">登录/</a>
        <a href="<{$config.weburl}>/register.php">注册</a>
    </div>
</div>

 <form method="post" action="<{$config.weburl}>/?m=product&s=shop_stock" onsubmit=" return check_data(); "  id="bookfrm" >
     <input type="hidden" name="act" value="stock"/>
     <input type="hidden" name="product_id" value="<{$de.id}>" />
    <div class="m-main">
        <!--<div class="buy-details-hd">-->
            <!--<h2 id="show_name"><{$product_info.pname}></h2>-->
        <!--</div>-->
        <!--order start-->
        <div class="big_box big_boxn">
            <div class="order-dist">
                <h4 class="payment-title">
                    登记信息：
                </h4>
                <div class="order-dist-warp">
                    <div class="o_take_kuai shipping1_1"  >
                        <ul>
                            <li><label class="name">票品名称：</label><div class="ob_input"><input type="text" name="product_name" class="com_ipt"  value="<{$de.pname}>" /></div></li>
                            <li><label class="name">票品价格：</label><div class="ob_input"><input type="text" name="price" id="price" class="com_ipt" value="<{$de.price}>" /></div></li>
                            <li><label class="name">票品数量：</label><div class="ob_input"><input type="text" name="num" id="num" class="com_ipt" value="1" /></div></li>
                            <li><label class="name">联系人：</label><div class="ob_input"><input type="text" name="user_name" id="user_name" class="com_ipt" value="" /></div></li>
                            <li><label class="name">联系手机：</label><div class="ob_input"><input type="text" class="com_ipt" name="user_mobile" id="user_mobile" value="" /></div></li>

                            <li><label class="name">省：</label><div class="ob_input">
                            <select name="provinceid" id="provinceid"  class="com_ipt" style="margin-right: 5px;">
                                <option value="">请选择</option>
                                <{foreach item=vo from=$prov}>
                                <option value="<{$vo.id}>" <{if $vo.id == $consignee.provinceid}> selected <{/if}> ><{$vo.name}></option>
                                <{/foreach}>
                            </select>
                        </div></li>

                            <li><label class="name">市：</label><div class="ob_input">
                                <select name="cityid" id="cityid"  class="com_ipt"  style="margin-right: 5px;">
                                    <option value="">请选择</option>
                                    <{if  !empty($consignee.cityid)}>
                                    <option value="<{$consignee.cityid}>" selected><{$consignee.cityid|get_city_name}></option>
                                    <{/if}>
                                </select>
                            </div></li>

                            <li><label class="name">区：</label><div class="ob_input">
                                <select name="areaid" id="areaid"  class="com_ipt">
                                    <option value="">请选择</option>
                                    <{if  !empty($consignee.areaid)}>
                                    <option value="<{$consignee.areaid}>" selected><{$consignee.areaid|get_city_name}></option>
                                    <{/if}>
                                </select>
                            </div></li>

                            <li>
                            <label class="name shouhuo">街道地址：</label><div class="ob_input"><textarea  name="user_addr" id="user_addr" placeholder="请输入备注"  style="width:100%;height: 60px;border:1px solid #e5e5e5;"><{$consignee.address}></textarea></div>
                            </li>
                        </ul>
                        <div class="order-tips">
                            <div class="order-tips-box">请详细填写以上信息</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--order end-->
    </div>

    <div class="bom_fix_box">

        <a class="booking" href="javascript:;"> 提交订单</a>
        <!--<input type="hidden" name="product_name" id="product_name" value="<{$product_info.pname}>" />-->
        <!--<input type="hidden" name="product_id" id="product_id" value="<{$product_info.id}>" />-->
        <!--<input type="hidden" name="act" value="reserve"/>-->
    </div>
</form>
</body>
<script language="JavaScript">


    $("#provinceid").on('change',function(){
        var provinceid = $(this).val();
        $.post("<{$config.weburl}>/ajax.php",{action:'get_city',id:provinceid},function(ret){
            ret = eval('('+ret+')');
            $("#cityid").html(ret.content);
        });
    });
    $("#cityid").on('change',function(){
        var cityid = $(this).val();
        $.post("<{$config.weburl}>/ajax.php",{action:'get_city',id:cityid},function(ret){
            ret = eval('('+ret+')');
            $("#areaid").html(ret.content);
        });
    });

    function check_data(){
        var price = $("#price").val();
        var user_name = $("#user_name").val();
        var user_mobile = $("#user_mobile").val();
        var cityid = $("#cityid").val();
        var areaid = $("#areaid").val();
        var user_addr = $("#user_addr").val();
        var preg_mobile = /^1\d{10}$/;

        if(price == ''){
            alert("价格不能为空");
            return false;
        } else if(user_name == '') {
            alert("请填写联系人");
            return false;
        } else if(user_mobile == '') {
            alert("请填写联系手机");
            return false;
        }  else if(!preg_mobile.test(user_mobile)) {
            alert("请填正确的手机号");
            return false;
        } else if(provinceid == '') {
            alert("请选择省");
            return false;
        } else if(cityid == '') {
            alert("请选择市");
            return false;
        } else if(areaid == '') {
            alert("请选择区");
            return false;
        } else if(user_addr == '') {
            alert("请填写街道地址");
            return false;
        } else {
            return true;
        }

    }



    $(".booking").on("click",function(){
            $("#bookfrm").submit();
    });







</script>

</html>
